CURRENT = $(shell uname -r)
KDIR = /lib/modules/$(CURRENT)/build
TARGET = LynxTWO_RT
OBJS = LinuxModule.o LynxTWO.o
MDIR = rtai
RTAIDIR = /usr/realtime
PWD = $(shell pwd)
DEST = /lib/modules/$(CURRENT)/kernel/$(MDIR)
EXTRA_CFLAGS += -DEXPORT_SYMTAB $(shell $(RTAIDIR)/bin/rtai-config --module-cflags)  -I$(src)   -I$(src)/LynxTWO -I$(src)/Include -DRTAI -DLINUX 
MACH=$(shell uname -i)

ifeq ($MACH,x86_64)
EXTRA_CFLAGS += -Dx86_64 -msse -msse2
else
EXTRA_CFLAGS += -Dx86
endif
obj-m      := $(TARGET).o
$(TARGET)-y  := $(OBJS)

-include $(KDIR)/Rules.make
